package com.lyz.dataStructure.algorithm.sanliuling2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 20:05
 * @Description:
 **/

import java.util.ArrayList;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/15 20:05
 *@Description:
 **/
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[][] nums = new int[2][N];
        int[][] arr = new int[1][N];
        for(int i =0;i<2;i++){
            for(int j = 0;j<nums[i].length;j++){
                nums[i][j] = sc.nextInt();
                arr[0][j] =nums[0][j]+nums[1][j];
            }
        }
        ArrayList list = new ArrayList();
        for(int i =0;i<1;i++){
            for(int j = 0;j<arr[i].length;j++){
                list.add(arr[i][j]%M);
            }
        }
        for(int m =0;m<list.size();m++){
            System.out.print(list.get(m)+" ");
        }
    }
}
